package com.zsf.service;

import com.zsf.dao.UserDao;
import com.zsf.dao.UserDaoImpl;
import com.zsf.dao.UserDaoMysqlImpl;
import com.zsf.dao.UserDaoOracleImpl;

public class UserServiceImpl implements UserService{

    //这样把Dao引入到这个Service里面
//    private UserDao userDao = new UserDaoOracleImpl();
    private UserDao userDao;

    //利用set进行动态实现值的注入
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void getUser() {
       //业务层调用Dao层
        userDao.getUser();
    }
}
